home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / rexx / indentleft.quill < prev    next >
Text File  |  1995-08-29  |  1KB  |  55 lines

  1.  
  2. /**
  3.  **  $VER: IndentLeft.quill 1.0 (30.9.94)
  4.  **  By Timothy J. Aston
  5.  **
  6.  **  Outdents the current line, or all lines with the currently marked block
  7.  **  left by a tab.
  8.  **
  9.  **/
  10.  
  11.  
  12. /* Some setup first.
  13.  */
  14. options results
  15. options failat 200
  16.  
  17. TAB = d2c(9)
  18.  
  19. main:
  20.     /* Make sure rexxsupport.library is there, just in case we need it.
  21.      */
  22.     if ~show(l, 'rexxsupport.library') then do
  23.         if ~addlib('rexxsupport.library', 0, -30) then do
  24.             'REQUESTNOTIFY' '"Could not build project:'NL' · libs:rexxsupport.library not installed"'
  25.             exit 10
  26.         end
  27.     end
  28.     
  29.     /* Get the starting and stopping lines.
  30.      */
  31.     'GETATTR PROJECT MARKINGBLOCK VAR' markingblock
  32.     if markingblock = TRUE then do
  33.         'GETATTR PROJECT BLOCKSTARTLINE VAR' startline
  34.         'GETATTR PROJECT BLOCKENDLINE VAR' endline
  35.         'MARK'
  36.     end
  37.     else do
  38.         'GETATTR PROJECT LINE VAR' startline
  39.         endline = startline
  40.     end
  41.     
  42.     /* Take a tab away from the beginning of each line.
  43.      */
  44.     'GOTOCOLUMN' 1
  45.     'GOTOLINE' startline
  46.     do i = startline to endline
  47.         'GETLINE'
  48.         if left(result, 1) = TAB then do
  49.             'DELETECHAR'
  50.         end
  51.         'LINE' 1
  52.     end
  53.     
  54.     exit
  55.